package thinkingJava.chapter09;

import thinkingJava.chapter08.Note;

abstract class Instrument {
	private int i;
	public abstract void play(Note n);
	public String what() {
		return "Instrument";
	}
	public abstract void adjust();
}
class Wind extends Instrument {
	public void play(Note n) {
		System.out.println("Wind.play()" + n);
	}
	public String what() {
		return "Wind.want()";
	}
	public void adjust() {
	}
}
class Percussion extends Instrument {
	public void play(Note n) {
		System.out.println("Percussion.play()" + n);
	}
	public String what() {
		return "Percussion.what()";
	}
	public void adjust() {
	}
}
class Stringed extends Instrument {
	public void play(Note n)  {
		System.out.println("Stringed.play()" + n);
	}
	public String what() {
		return "Stringed";
	}
	public void adjust() {
	}
}
class Woodwind extends Wind {
	public void play(Note n) {
		System.out.println("Woodwind.play()" + n);
	}
	public String what() {
		return "Woodwind";
	}
}
class B extends Wind {

}
public class Music4 {
	static void tune(Instrument i) {
		i.play(new Note());
	}
	static void tuneAll(Instrument[] i) {
		for (Instrument e : i) {
			tune(e);
		}
	}
	public static void main(String[] args) {
		Music4 m = new Music4();
	}
}
